﻿using Dora.Tools.Enums.AdminUser;
using Dora.Tools.Utility;
using System;
using System.Collections.Generic;
using System.Text;

namespace Dora.Services.AdminUser.Dto.ViewDto
{
    public class TasOrgListItemDto
    {
        /// <summary>
        /// 组织机构Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 简称
        /// </summary>
        public string ShortName { get; set; }
        /// <summary>
        /// 0：总社
        /// 1：分社
        /// 2：门店
        /// </summary>
        public int OrgLevel { get; set; }
        /// <summary>
        /// 机构所在省份名称
        /// </summary>
        public string ProvinceName { get; set; }
        /// <summary>
        /// 机构所在城市名称
        /// </summary>
        public string CityName { get; set; }
        /// <summary>
        /// 机构所在区(县)名称
        /// </summary>
        public string DistrictName { get; set; }
        /// <summary>
        /// 机构所在镇(乡)名称
        /// </summary>
        public string TownName { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 组织机构级别显示文本
        /// 0：总社
        /// 1：分社
        /// 2：门店
        /// </summary>
        public string OrgLevelDisplay { get { return ((OrgLevel)OrgLevel).ToDescription(); } }
        /// <summary>
        /// 上级Id
        /// </summary>
        public int ParentId { get; set; }
        /// <summary>
        /// 上级机构名称
        /// </summary>
        public string ParentOrgName { get; set; }

        /// <summary>
        /// 上级组织机构的级别
        /// </summary>
        public int ParentOrgLevel { get; set; }

        /// <summary>
        /// 是否禁用 2019-05-14新增字段
        /// </summary>
        public short IsDisabled { get; set; }

        /// <summary>
        /// 是否冻结 2019-05-14新增字段
        /// </summary>
        public short IsFrozen { get; set; }

        /// <summary>
        /// 是否包含子机构
        /// </summary>
        public short HasSub { get; set; }

        /// <summary>
        /// 是否包可独立签约保险的分社机构
        /// </summary>
        public bool HasInsuranceSub { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string LeaderName { get; set; }
        /// <summary>
        /// 负责人联系电话
        /// </summary>
        public string LeaderPhone { get; set; }
        /// <summary>
        /// 保证金
        /// </summary>
        public decimal DepositMoney { get; set; }

        /// <summary>
        /// 标签
        /// </summary>
        public string Tags { get; set; }
        /// <summary>
        /// 审批状态
        /// </summary>
        public short AuditState { get; set; }

        /// <summary>
        /// 审批状态文本
        /// </summary>
        public string AuditStateText
        {
            get
            {
                return ((StoreAuditState)AuditState).ToDescription();
            }
        }

        /// <summary>
        /// 授信额度
        /// </summary>
        public decimal GrantingCredit { get; set; }
        /// <summary>
        /// 简称首字母缩写
        /// </summary>
        public string ShortCode { get; set; }
        /// <summary>
        /// 标签Id列表
        /// </summary>
        public string TagIds { get; set; }
        /// <summary>
        /// 标签名称列表
        /// </summary>
        public string TagNames { get; set; }

        /// <summary>
        /// 已签约的供应商数量
        /// </summary>
        public int SupplierCount { get; set; }

        public int FreezeType { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }
    }
}
